<html>

<header>

 <meta name="viewport" content="width=device-width, initial-scale=1">

<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

<meta http-equiv="content-language" content="zh-CN" />

<link href="https://cdn.bootcss.com/jquery-jsonview/1.2.3/jquery.jsonview.min.css" rel="stylesheet">

<link href="https://cdn.bootcss.com/github-markdown-css/3.0.1/github-markdown.css" rel="stylesheet">

<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>

<style>
                                .markdown-body {
                                    box-sizing: border-box;
                                    min-width: 200px;
                                    max-width: 980px;
                                    margin: 0 auto;
                                    padding: 45px;
                                }
                            
                                @media (max-width: 767px) {
                                    .markdown-body {
                                        padding: 15px;
                                    }
                                }

</style>

</header>

<body class='markdown-body'>

<h1>API Markdown 文档，源于<a href="https://github.com/china-wangyu/TRR">TRR</a>的美好生活💑。</h1>

<h2><code>TOC</code>目录</h2>

<ul>

<li><p><a href="#app\api\controller\Auth:授权类">app\api\controller\Auth:授权类</a></p><ul><p><a href="#create:创建授权">create:创建授权</a></p><p><a href="#refresh:刷新授权">refresh:刷新授权</a></p></ul></li><li><p><a href="#app\api\controller\v1\Book:图书类">app\api\controller\v1\Book:图书类</a></p><ul><p><a href="#create:创建图书">create:创建图书</a></p></ul></li></ul>

<h2><code>API</code>内容</h2>

<h3><span id="app\api\controller\Auth:授权类">app\api\controller\Auth:授权类</span></h3>

<h4><span id="create:创建授权">create:创建授权</span></h4>

<ul><li><p>[url] : <code>auth/</code></p></li><li><p>[method] : <code>post</code></p></li><li><p>[params] : <code>请求参数文档</code></p><table><thead>
                    <tr>
                        <th style="text-align: center;">参数名称</th>
                        <th style="text-align: center;">参数文档</th>
                        <th style="text-align: center;">参数 <code>filter</code></th>
                        <th style="text-align: center;">参数默认</th>
                    </tr>
                </thead><tbody><tr>
                        <td style="text-align: center;">password</td>
                        <td style="text-align: center;">密码</td>
                        <td style="text-align: center;">require</td>
                        <td style="text-align: center;"></td>
                    </tr><tr>
                        <td style="text-align: center;">name</td>
                        <td style="text-align: center;">名称</td>
                        <td style="text-align: center;">require</td>
                        <td style="text-align: center;"></td>
                    </tr></tbody></table></li><p>[success] : <code>成功返回样例</code></p><pre><code id="result" class="language-json5">{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJUUlIiLCJpYXQiOjE1NjQwNDc4ODcsImV4cCI6MTU2NDA1NTA4NywidXVpZCI6MTAwLCJzaWduYXR1cmUiOiIxMiJ9.QAvjERUOvQ2QwUcPnQOJuYGuTDgzWCZ7gaNziJHDmVI","refresh_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJUUlIiLCJpYXQiOjE1NjQwNDc4ODcsInV1aWQiOjEwMCwic2lnbmF0dXJlIjoiMTIifQ.n-TZSFr9NqaTIjWpxR3ZUeP7WobYrhYvS5lIVkxRaIM"}</code></pre>

<p>[error] : <code>失败返回样例</code></p><pre><code id="result" class="language-json5">{"code":3000,"message":"3000: \u9519\u8bef\u5185\u5bb9 . \u53c2\u6570\u9a8c\u8bc1 . name\u4e0d\u80fd\u4e3a\u7a7a,password\u4e0d\u80fd\u4e3a\u7a7a","request_url":"auth"}</code></pre>

</ul>

<h4><span id="refresh:刷新授权">refresh:刷新授权</span></h4>

<ul><li><p>[url] : <code>auth/refresh</code></p></li><li><p>[method] : <code>get</code></p></li><li><p>[params] : <code>请求参数文档</code></p><table><thead>
                    <tr>
                        <th style="text-align: center;">参数名称</th>
                        <th style="text-align: center;">参数文档</th>
                        <th style="text-align: center;">参数 <code>filter</code></th>
                        <th style="text-align: center;">参数默认</th>
                    </tr>
                </thead><tbody></tbody></table></li><p>[success] : <code>成功返回样例</code></p><pre><code id="result" class="language-json5">{"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJUUlIiLCJpYXQiOjE1NjQxMDY2ODAsImV4cCI6MTU2NDExMzg4MCwidXVpZCI6MTAwLCJzaWduYXR1cmUiOiIyMyJ9.1Te9jeAQVvj6VbgiVEk1-CChn8KybpOXqiyH8a4UB68"}</code></pre>

<p>[error] : <code>失败返回样例</code></p><pre><code id="result" class="language-json5">{"code":3000,"message":"3000: \u9519\u8bef\u5185\u5bb9 . 1000: \u9519\u8bef\u5185\u5bb9 . \u8bf7\u6c42header\u672a\u643a\u5e26authorization\u4fe1\u606f","request_url":"auth\/refresh"}</code></pre>

</ul>

<h3><span id="app\api\controller\v1\Book:图书类">app\api\controller\v1\Book:图书类</span></h3>

<h4><span id="create:创建图书">create:创建图书</span></h4>

<ul><li><p>[url] : <code>v1/book/</code></p></li><li><p>[method] : <code>get</code></p></li><li><p>[params] : <code>请求参数文档</code></p><table><thead>
                    <tr>
                        <th style="text-align: center;">参数名称</th>
                        <th style="text-align: center;">参数文档</th>
                        <th style="text-align: center;">参数 <code>filter</code></th>
                        <th style="text-align: center;">参数默认</th>
                    </tr>
                </thead><tbody><tr>
                        <td style="text-align: center;">img</td>
                        <td style="text-align: center;">图书img</td>
                        <td style="text-align: center;">require|graph|length:1,16</td>
                        <td style="text-align: center;"></td>
                    </tr><tr>
                        <td style="text-align: center;">name</td>
                        <td style="text-align: center;">图书名称</td>
                        <td style="text-align: center;">require|graph|length:1,50</td>
                        <td style="text-align: center;"></td>
                    </tr></tbody></table></li><p>[success] : <code>成功返回样例</code></p><pre><code id="result" class="language-json5"></code></pre>

<p>[error] : <code>失败返回样例</code></p><pre><code id="result" class="language-json5"></code></pre>

</ul>

<h1> 感谢🙏使用<a href="https://github.com/china-wangyu/TRR">TRR</a>，祝你生活美满～</h1>

<script src="https://cdn.bootcss.com/jquery-jsonview/1.2.3/jquery.jsonview.min.js"></script>
            <script>
                //页面加载json格式化
                $(function () {
                    $(".language-json5").each(function (i) {
                        console.log($(this))
                        var json = $(this).html();
                        if (json != '' && json != 'undefined'){
                            $(this).JSONView(json);
                        }
                    })
                });
            </script>

